package com.example.echoewish.repository.network.service;

import com.example.echoewish.pojo.Comment;
import com.example.echoewish.pojo.MyComment;
import com.example.echoewish.pojo.OthersComment;

import java.util.List;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface CommentService {

    @GET("comment/insert")
    Call<ResponseBody> publishNewComment(@Query("postId")int postId, @Query("userId")int userId
    , @Query("content")String content, @Query("time") String time);

    @GET("comment/delete")
    Call<ResponseBody> deleteComment(@Query("postId")int postId,@Query("userId")int userId
            ,@Query("content")String content,@Query("time") String time);

    @GET("comment/queryCommentByPostId")
    Call<List<Comment>> queryCommentByPostId(@Query("postId")int postId);

    @GET("comment/queryMyCommentByUserId")
    Call<List<MyComment>>queryMyCommentByUserId(@Query("userId") int userId);

    @GET("comment/queryOthersCommentByUserId")
    Call<List<OthersComment>>queryOthersCommentByUserId(@Query("userId") int userId);
}
